<template>
	<view class="c-upload">
		<uni-file-picker :limit="limit" :image-styles="imageStyles">
			<slot>
				<view class="upload-btn">
					<uni-icons type="image" color="#a5a8af" size="28"></uni-icons>
					<text class="upload-text">{{ tips }}</text>
				</view>
			</slot>
		</uni-file-picker>
	</view>
</template>

<script setup>
	const props = defineProps({
		tips: {
			type: String,
			default: '请上传图片'
		}
	})
</script>

<style lang="scss">
	.c-upload {
		.upload-btn {
			@include f-center($direction: column);
			width: 100%;
			height: 100%;
			.upload-text {
				margin-top: $margin-12;
				font-size: $font-24;
				color: $tips-color;
				font-weight: 400;
			}
		}
	}
</style>
